home *** CD-ROM | disk | FTP | other *** search
- Short: The string gadget with a PhD in Mathematics, MUI Custom Class
- Author: Vincenzo Gervasi (gervasi@di.unipi.it)
- Uploader: Vincenzo Gervasi (gervasi@di.unipi.it)
- Type: dev/mui
-
- MathString is a subclass of the String class that adds mathematical
- abilities to its superclass.
-
- A MathString object can accept complex floating-point expressions,
- including algebraic operators, functions, measuring units, and
- return to the application only the value of the expression, giving
- the user the freedom to express a value as (S)HE feels it's easier,
- without burdening the application. For most things, handling
- a MathString object is as easy as a traditional String object via
- the MUIA_String_Integer tag.
-
- The language accepted by a MathString object is as follows:
-
- id ::= 1-to-4-character (like IFF's IDs)
- num ::= signed floating point, simple or exponential notation
- mnum ::= num
- | num id /* id is measuring unit */
- mexp ::= mnum
- | mexp*mnum
- | mexp/mnum
- | (aexp)
- | id(aexp) /* id is function name */
- | id /* id is a constant */
- aexp ::= mexp
- | aexp+mexp
- | aexp-mexp
-
- Spaces are not significant, except between digits, in an id, or
- between an id and a "(".
-
- Some example:
-
- 3.4 m / (1e10+3Km)
- 2*sin(30°)
- 1 in - 12 pt
- cos(pi)/(1/3)
-
- MathString supports custom measuring units, custom functions,
- custom constants, single- or double-precision IEEE and FFP modes,
- automatic error handling, several built-in measuring systems
- and more.
-
-
- DISTRIBUTION
-
- MathString is (C) 1996 V. Gervasi, but freely distributable as long
- as the following conditions are met:
-
- 1. If you use MathString in a commercial or shareware product, you
- have to send me a full (registered) package (copy) of the product,
- including any update that still uses MathString.mcc.
- Also, the text "MathString (C) 1996 V. Gervasi" should go in your
- printed documentation, if any.
-
- 2. If you use MathString in a PD product, you only have to put the text
- "MathString (C) 1996 V. Gervasi" in your "About" window OR in the same
- place where the "MUI (C) Stefan Stuntz" text is OR in the documentation.
-
- In any case, I would appreciate an e-mail announcing the product.
- Provided that the above mentioned conditions are met, you can distribute
- MathString with your product, having care not to overwrite any later
- MathString.mcc the user could have already installed.
-
-
- AUTHOR
-
- Vincenzo Gervasi gervasi@di.unipi.it
- Dipartimento di Informatica
- Corso Italia, 40
- I-56125 PISA
- Italy
-
-